package com.app.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;

import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author zxy
 * @since 2021-04-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 预约计划id
     */
    private Integer subid;

    /**
     * 生成时间
     */
    private Date createTime;

    /**
     * 学员id
     */
    private Integer sid;

    /**
     * 逻辑撤销
     */
    @TableLogic
    private Integer deleted;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 评分
     */
    private Integer score;

    private Character state;  // 0

    private Character textState;//考试的科目

    @JSONField(name = "stateName")
    public String stateName() {
        if (this.state == '0') {
            return "学时未审核";
        } else if (this.state == '1') {
            return "学时审核通过，未评价";
        } else {
            return "完成";
        }
    }

}
